﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Medianamik.Core.Security;
using System.Globalization;
using Medianamik.Core.Interfaces;
using System.Web.Security;

namespace Medianamik.Core.Profile
{
    public class ProfileNode : SystemNode<ProfileNode>  
    {     
       public string FullName
       {
           get
           {
               return DefaultInstance.Properties["FullName"].GetValue<string>();
           }
           set
           {
               DefaultInstance.Properties["FullName"].SetValue(value);
           }
       }

       public string UICultureName
       {
           get
           {
               return DefaultInstance.Properties["UICultureName"].GetValue<string>();
           }
           internal set
           {
               DefaultInstance.Properties["UICultureName"].SetValue(value);
           }
       }

       public DateTime? LastLoginDate 
       {
           get
           {
               return DefaultInstance.Properties["LastLoginDate"].GetValue<DateTime?>();
           }
           set
           {
               DefaultInstance.Properties["LastLoginDate"].SetValue(value);
           }
       }

       public DateTime? SubscriptionDate
       {
           get
           {
               return DefaultInstance.Properties["SubscriptionDate"].GetValue<DateTime?>();
           }
           set
           {
               DefaultInstance.Properties["SubscriptionDate"].SetValue(value);
           }
       }

       public Guid UserId
       {
           get
           {
               return DefaultInstance.Properties["User"].GetValue<Guid>();
           }
           set
           {
               DefaultInstance.Properties["User"].SetValue(value);
           }
       }

       public override Guid NodeTypeID
       {
           get
           {
               return SystemNodeTypeID;
           }
       }

       public override  Guid SystemNodeTypeID
       {
           get { return MedianamikTypes.MedianamikProfile ; }
       }
    }
}